//导入vue-router
import { createRouter, createWebHistory } from 'vue-router'
//导入组件
import denglu from '../views/denglu.vue'
import shouye from '../views/shouye.vue'

import fenglei from '../views/fenglei.vue'
import guanli from '../views/guanli.vue'
import ziliao from '../views/ziliao.vue'
import genghuan from '../views/genghuan.vue'
import chongzhi from '../views/chongzhi.vue'
//定义路由关系
const routes = [
    { path: '/', component: denglu },
    { path: '/shouye', component: shouye
        ,children:[
            {path:'/shouye/fenglei',component:fenglei},
            {path:'/shouye/guanli',component:guanli},
            {path:'/shouye/ziliao',component:ziliao},
            {path:'/shouye/genghuan',component:genghuan},
            {path:'/shouye/chongzhi',component:chongzhi},
        ]
     }
    
]

//创建路由器
const router = createRouter({
    history: createWebHistory(),
    routes: routes
});

export default router